<template>
  <div>
    <el-tabs type="border-card">
      <el-tab-pane label="交易明细">
        <el-table :data="tableData" stripe style="width: 100%" border>
          <el-table-column prop="create_time" label="登录IP" width="180"></el-table-column>
          <el-table-column prop="merChantOrder" label="登录时间" width="180"></el-table-column>
          <el-table-column prop="systemOrder" label="公司名称"></el-table-column>
          <el-table-column prop="platformOrder" label="公司类型"></el-table-column>
          <el-table-column prop="orderNum" label="公司类型"></el-table-column>
          <el-table-column prop="dealNum" label="公司类型"></el-table-column>
          <el-table-column prop="merChantNum" label="公司类型"></el-table-column>
          <el-table-column prop="agentNum" label="公司类型"></el-table-column>
          <el-table-column prop="platformNum" label="公司类型"></el-table-column>
          <el-table-column prop="channelNum" label="公司类型"></el-table-column>
          <el-table-column label="公司类型">
            <template v-slot="{ row }">
              <span>{{ row.merChant.merName}}</span>
            </template>
          </el-table-column>
          <el-table-column label="公司类型">
            <template v-slot="{ row }">
              <span>{{ row.agent.epName}}</span>
            </template>
          </el-table-column>
          <el-table-column label="公司类型">
            <template v-slot="{ row }">
              <span>{{ row.channelPro.channel.channelCom}}</span>
            </template>
          </el-table-column>
          <el-table-column label="公司类型">
            <template v-slot="{ row }">
              <span>{{ row.channelPro.product.productName}}</span>
            </template>
          </el-table-column>
          <!-- <el-table-column label="操作">
            <template slot-scope="{ row }">
              <el-button size="mini" type="primary" @click="open(row)">禁用</el-button>
              <el-button size="mini" type="primary" @click="update(row)">修改</el-button>
              <el-button size="mini" type="danger" @click="del(row)">删除</el-button>
            </template>
          </el-table-column>-->
        </el-table>
        <div class="dis-center">
          <el-pagination
            @current-change="handleCurrentChange"
            :current-page.sync="pageInfo.page"
            :page-size.sync="pageInfo.size"
            layout="prev, pager, next, jumper"
            :total="pageInfo.total"
          ></el-pagination>
        </div>
      </el-tab-pane>
      
    </el-tabs>
    <div class="line-to"></div>
  </div>
</template>

<script>
import { listOrder, listWithAgent } from "@/api/dealManage";
const status = {
  1: "处理中",
  2: "处理异常",
  3: "处理成功",
  4: "处理失败"
};
export default {
  name: "dealManage",
  data() {
    return {
      status,
      pageInfo: {
        page: 1,
        size: 10
      },
      tableData: [],
      
      agentData: []
    };
  },
  methods: {
    getListOrder() {
      listOrder().then(res => {
        if (res.data.code === 200) {
          this.tableData = res.data.data;
          this.pageInfo = res.data.pageInfo;
        }
      });
    },
    handleCurrentChange(val) {
      listOrder({
        page: val
      }).then(res => {
        if (res.data.code === 200) {
          this.tableData = res.data.data;
          this.pageInfo = res.data.pageInfo;
        }
      });
    }
  },
  created() {
    this.getListOrder();
  }
};
</script>

<style rel="stylesheet" lang="scss" scoped>
@import "../../styles/norlize.scss";
</style>